package com.hexacta.hrs.services.feedbacks;

import java.util.Collection;

import com.hexacta.hrs.domain.feedback.Period;

public interface PeriodService {

    /**
     * @return null if no period is open, the open period otherwise
     */
    public Period getOpenPeriod();

    /**
     * 
     * @return true if any period is open, false if none is
     */
    public boolean existsOpenPeriod();

    public Collection<Period> findAll();

    public void closePeriod(Period period);

    public void closePeriod(String year);

    public void openPeriod(Period period);

    public void openPeriod(String year);

    public Period getLastPeriod();

    public Period getPeriodByYear(String year);

    void update(Period period);

    public void save(Period period);

    void delete(Long periodId);
}
